package com.centerm.structure.dto;

import javax.validation.constraints.NotNull;

import org.hibernate.validator.constraints.NotBlank;

import com.centerm.common.constant.validate.Delete;
import com.centerm.common.constant.validate.Insert;
import com.centerm.common.constant.validate.Update;

public class PermissionInfo {
	@NotNull(groups = {Update.class,Delete.class})
    private Integer id;

    private Integer parentId;
    @NotBlank(groups = {Insert.class})
    private String code;
    @NotBlank(groups = {Insert.class})
    private String name;
    @NotBlank(groups = {Insert.class})
    private String path;

    private String description;
    @NotNull(groups = {Insert.class})
    private Integer level;

    private Integer valid;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code == null ? null : code.trim();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path == null ? null : path.trim();
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description == null ? null : description.trim();
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Integer getValid() {
        return valid;
    }

    public void setValid(Integer valid) {
        this.valid = valid;
    }
}